import request from '@/utils/request'
import downloadService from "@/utils/downloadService";

// 查询句子库列表
export function listSentence(query) {
  return request({
    url: '/content/sentence/list',
    method: 'get',
    params: query
  })
}

// 查询句子详细
export function getSentence(id) {
  return request({
    url: '/content/sentence/' + id,
    method: 'get'
  })
}

// 新增句子
export function addSentence(data) {
  return request({
    url: '/content/sentence',
    method: 'post',
    data: data
  })
}

// 修改句子
export function updateSentence(data) {
  return request({
    url: '/content/sentence',
    method: 'put',
    data: data
  })
}

// 删除句子
export function delSentence(id) {
  return request({
    url: '/content/sentence/' + id,
    method: 'delete'
  })
}

// 导出句子库
export function exportSentence() {
  return downloadService({
    url: '/content/sentence/export',
    method: 'get'
  })
}
